.text-display {
  margin: 0px 0;
  position: relative;
  overflow-wrap: anywhere;
  padding: 0 20px;
}

.complete-all-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.complete-all-text {
  margin-left: 10px;
  font-size: 14px;
  color: #666;
}

.sentence-pair {
  display: flex;
  border-bottom: 1px solid #eee;
  padding: 2px 4px;
  margin-bottom: 4px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.sentence-pair:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.sentence-pair.active {
  border-left: 4px solid #42b983;
  .english {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    background: linear-gradient(
      to right,
      #42b983,
      #42b98399 50%,
      #42b98301 100%
    );
  }
  .line-number {
    color: #fefefe;
  }
  .notes {
    background-color: transparent;
    border-bottom: 1px solid #eeee00;
  }
}

.sentence-item {
  flex: 1;
  padding: 0 10px;
  display: flex;
  align-items: center;
}

.english {
  border-right: 1px solid #eee;
}
.chinese {
  max-width: 30%;
}
.notes {
  font-style: italic;
  font-size: 0.8rem;
  font-family: 'Times New Roman', Times, serif;
  background-color: lightyellow;
  padding: 0.2rem;
  font-weight: 100;
}

.english .text {
  font-family: 'DynaPuff light', sans-serif;
  font-size: 1.5rem;
  font-weight: normal;
  color: #212529;
  margin: 0px;
  line-height: 1.5;
  cursor: pointer;
}

.chinese .text {
  font-size: 1rem;
  color: #495057;
  margin: 0;
  line-height: 1.5;
  font-family: 'fangsong';
}

.line-number {
  font-weight: bold;
  margin-right: 10px;
  color: #42b983;
}

.text {
  line-height: 1.5;
  flex: 1;
  cursor: default;
  word-break: break-word;
  white-space: normal;
}

.word {
  cursor: pointer;
  padding: 0px 2px;
  border-radius: 3px;
  transition: background-color 0.2s;
  display: inline-block;
  white-space: nowrap;
  margin-right: 2px;
}

.word:hover {
  background-color: #f0f0f0;
}

.word-selected {
  background-color: #42b983 !important;
  color: white;
}

.legend {
  border-radius: 4px;
  padding: 2px 4px;
  cursor: pointer;
  font-family: 'Arial', Courier, monospace;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 4px;
}
.showChinese {
  border: 2px solid black !important;
  background-color: lightgray !important;
  font-weight: normal;
  color: black;
}
.ielts-word {
  border: 1px solid #ffeb3b8a !important;
  background-color: #ffeb3b8a !important;
  font-weight: normal;
}

.difficult-word {
  border: 2px solid #ff6b35 !important;
  background-color: #ff6b35 !important;
  color: white !important;
  font-weight: normal;
}

.sentence-play-btn {
  margin-left: 10px;
}

.popover-trigger {
  position: fixed;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.word-popover-content {
  max-height: 300px;
  overflow-y: auto;
}

.word-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.word-header h3 {
  margin: 0;
}

.word-phonetic {
  margin-bottom: 10px;
  font-style: italic;
  color: #666;
}

.meaning-item {
  margin-bottom: 10px;
}

.meaning-item ul {
  padding-left: 20px;
}

.part-of-speech {
  font-weight: bold;
  color: #42b983;
  margin-right: 5px;
}

.variation-item {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
}

.variation-explanation {
  font-style: italic;
}

.word-actions {
  margin-top: 15px;
  text-align: center;
}

.sentence-actions {
  display: flex;
  align-items: center;
  padding: 0 10px;
}

.module-navigation {
  display: flex;
  align-items: center;
  padding: 0 10px;
}

.module-navigation a {
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

/* 新增控制按钮样式 */
.control-button {
  padding: 12px 10px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: none;
  background-color: #f8f9fa;
  color: #333;
  font-weight: 500;
  cursor: pointer;

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: #e9ecef;
  }

  &.primary {
    background-color: #409eff;
    color: white;

    &:hover {
      background-color: #337ecc;
      box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
    }
  }

  &:disabled {
    opacity: 0.6;
    cursor: not-allowed;

    &:hover {
      transform: none;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }
  }
}

.control-button-get {
  padding: 12px 10px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 255, 0, 0.1);
  transition: all 0.3s ease;
  border: none;
  background-color: rgb(180, 255, 180);
  color: #fd772f;
  font-weight: 500;
  cursor: pointer;

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.15);
    background-color: rgb(180, 255, 180);
  }

  &.primary {
    background-color: #409eff;
    color: white;

    &:hover {
      background-color: #337ecc;
      box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
    }
  }

  &:disabled {
    opacity: 0.6;
    cursor: not-allowed;

    &:hover {
      transform: none;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }
  }
}

a:-webkit-any-link {
  color: -webkit-link;
  cursor: pointer;
  text-decoration: none;
}

@media (max-width: 768px) {
  .text-display {
    padding: 0px;
    margin-bottom: 150px;
  }
  .chinese {
    max-width: 100%;
  }

  .complete-all-section {
    padding: 4px 4px;
  }
  .module-navigation {
    display: none;
  }
  .line-number {
    display: none;
  }
  .sentence-pair {
    padding: 15px 5px;
    flex-direction: column;
  }

  .english .text {
    font-size: 1rem;
  }

  .chinese .text {
    font-size: 0.9rem;
  }

  .control-button {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
  .complete-all-text {
    display: none;
  }
  .sentence-actions {
    justify-content: space-around;
    margin-top: 10px;
  }
}
